package com.example.demo.factory.factory02;

/**
 * @Description
 * @Author youxin
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2021/12/23
 */
public class SimpleFactory {

    public Pizza createPizza(String orderType){
            Pizza pizza=null;
            if(orderType.equals("chinese")){
                pizza=new ChinesePizza();
            }else if(orderType.equals("japan")){
                pizza=new JappanPizza();
            }
            return pizza;
    }
}
